//
//  UIWebView+BL.m
//  weather
//
//  Created by 大L君的无敌战舰 on 16/4/14.
//  Copyright © 2016年 bigL.com. All rights reserved.
//

#import "UIWebView+BL.h"

@implementation UIWebView (BL)

//加载网页，属性
-(void)showWebWithURL:(NSString *)urlStr
{
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:urlStr]];
    
    [self loadRequest:request];
    
    //识别特殊标记
    self.dataDetectorTypes = UIDataDetectorTypeAll;
    //加载
    [self loadRequest:request];
    //自动调整尺寸
    self.scalesPageToFit = YES;
    
}

//加载本地文件
-(void)showFlieWithPath:(NSString *)path
{
    NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL fileURLWithPath:path]];
    
    //识别特殊标记
    self.dataDetectorTypes = UIDataDetectorTypeAll;
    //加载
    [self loadRequest:request];
    //自动调整尺寸
    self.scalesPageToFit = YES;
}

@end
